import 'tests/unit/lib/before-test'
import {
  shallowMount,
  mockAxios,
  i18n,
  store,
  router,
  localVue
} from 'tests/unit/lib/commonImport'
import Ellipsis from '@/components/Ellipsis/Ellipsis'

describe('Ellipsis.vue', () => {
  let wrapper
  beforeEach(() => {
    wrapper = shallowMount(Ellipsis, {
      localVue,
      router,
      i18n,
      store,
      slots: {
        default: 'abcabcabcabc'
      },
      propsData: {
        tooltip: true,
        length: 10
      }
    })
  })
  it('Ellipsis demo', done => {
    mockAxios.post.mockImplementationOnce(() =>
      Promise.resolve('value')
    )
    wrapper.vm.$nextTick(() => {
      expect(wrapper.exists()).toBe(true)
      done()
    })
  })
})
